<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreatePushMessageTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('push_message', function (Blueprint $table) {
            $table->increments('id');
            $table->string('push_user_ids', 500)->default('')->comment('推送用户ID');
            $table->tinyInteger('push_gender')->default(-1)->comment('发送性别');
            $table->tinyInteger('push_recharge')->default(-1)->comment('发送用户是否充值');
            $table->tinyInteger('push_role')->default(-1)->comment('发送用户角色');
            $table->tinyInteger('push_type')->default(1)->comment('发送内容类型');
            $table->string('push_title', 80)->default('')->comment('推送标题');
            $table->string('push_content', 500)->default('')->comment('推送内容');
            $table->string('jump_type', 10)->default('h5')->comment('配置跳转类型');
            $table->string('jump_link', 100)->default('')->comment('跳转链接');
            $table->timestamps();
            $table->tinyInteger('flag')->default(1)->comment('有效标识');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('push_message');
    }
}
